package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloudkinto.entity.OrderCostExportDto;
import com.cloudkinto.entity.OrderOutputDo;
import com.cloudkinto.entity.OrderProductSellCountEntity;
import com.cloudkinto.extentity.*;
import com.cloudkinto.extentity.orderinput.AccumulateOrderCount;
import com.cloudkinto.extentity.output.AnalysisOrderOutputDto;
import com.cloudkinto.extentity.output.OrderOutputSendCensusDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 张永远
 * @since 2020-06-04
 */
@Mapper
public interface OrderOutputDao extends BaseMapper<OrderOutputDo> {
    List<OrderOutputDo> selectList1(@Param("map")Map<String, String> map);

    List<OrderOutputDo> listPage(IPage<OrderOutputDo> page, @Param("map") Map<String, String> map);

    List<OrderOutputDo> listPage(@Param("map") Map<String, String> map);

    List<Integer> selectCountList(@Param("map") Map<String, String> map);
    List<Integer> selectFBACountList(@Param("map") Map<String, String> map);

    void updateTrackStatus(Integer key, List<Object> list);

    List<String> selectLastHourOrder(String startTime, String endTime);

    List<OrderOutputDo> selectPostExpress2ApiList(String sdate,String edate);

    List<OrderOutputDo> selecTodayTrackNumberList(String date);

    void updateTrackNumber(@Param("status")Long status,@Param("trackNumber")String trackNumber);

    List<OrderProductSellCountEntity> selectBastSellProduct(IPage<OrderProductSellCountEntity> page, @Param("map") Map<String, String> map);

    List<OrderProductSellCountEntity> selecgrownFastProduct(IPage<OrderProductSellCountEntity> page, @Param("map")Map<String, String> map);

    int updateOrderCheckId(Long orderId, Long outCreateCheckState);

    StorageSituationDto getStorageSituation(@Param("map") Map<String, String> map);

    List<OutputChannelDto> getOutputDeliveryChannel(@Param("map") Map<String, String> map);

    List<OutputChannelDto> getOutputFBAChannel(@Param("map") Map<String, String> map);

    List<OrderAnalysisDto> getOrderAnalysis(@Param("map") Map<String, String> map);

    List<StorageRecordsAnalysisDto> getStorageRecordsAnalysis(@Param("map")  Map map);

    List<CustomerRecordsAnalysisDto> getCustomerRecordsAnalysis(@Param("map") Map map);

    void updatePickUpIdNull(Long pickupId, Long userId);

    List<OrderCostExportDto> selectOrderCostExcelExport(@Param("idList") List<String> idList);

    List<OrderOutputDo> getToPickupList();


    List<OrderOutputSendCensusDto> censusSendCount(@Param("map") Map<String, String> map);

    AnalysisOrderOutputDto memberAnalysis(Long storageId);

    List<OrderOutputYamatoSizeExcelExportDto> selePackageNumberAndSize(@Param("idList")List<Long> orderIdsList);

    List<OrderOutputDo> selectYamatoSize();

    int updateTrackMatch(Long id, int trackMatch);

    List<String> selectLastHourOrderC1370(String timeD, String timeE);
}
